//this class use ace library thread to implement threadimpl interface
//andycai_sc 2011-05-12

#ifndef ACETHREADIMPL_H
#define ACETHREADIMPL_H

#include <ace/Thread_Manager.h>
#include "GParallel/GThreadImpl.h"

class ACEThreadImpl : public GThreadImpl
{
public:
    ACEThreadImpl(GThread* _thread);
    virtual ~ACEThreadImpl();

    void startImpl();
    void stopImpl();
	void joinImpl();

	static void ace_msleep(long mseconds);

private:
    static ACE_THR_FUNC_RETURN thread_fuc(void *);
    ACE_Thread_Manager m_threadMgr;
    ACE_thread_t m_thId;
};


#endif // ACETHREADIMPL_H
